﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Giaodien_DV.Master" AutoEventWireup="true" CodeBehind="dsdoanvien.aspx.cs" Inherits="BT_web__nhom06.dsdoanvien" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="title" style="text-align:center">Danh sách Đoàn Viên 
              
     </div>
      <div style="margin-left:450px"></div>
 <div class="section_box">
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:qldvConnectionString %>" SelectCommand="SELECT [MaChiDoan], [MaSinhVien], [Ten], [Ho], [NgaySinh], [DienThoaiLienHe], [TinhTrang] FROM [DoanVien]"></asp:SqlDataSource>
     <strong>Lọc dữ liệu đoàn viên</strong><br>
     <table style="width: 100%">
         <tr>
             <td>theo tên
                 đoàn viên</td>
             <td>
                 <asp:TextBox ID="txtLocTheoTenDoanVien" runat="server" Width="190px"></asp:TextBox>
             </td>
         </tr>
         <tr>
             <td>theo số điện thoại</td>
             <td>
                 <asp:TextBox ID="txtLocTheoSoDienThoai" runat="server" Width="188px"></asp:TextBox>
             </td>
         </tr>
         <tr>
             <td>&nbsp;</td>
             <td>
                 <asp:Button ID="btnApDungLoc" runat="server" Text="Áp dụng" OnClick="btnApDungLoc_Click" />
             </td>
         </tr>
         <tr>
             <td>&nbsp;</td>
             <td>
                 &nbsp;</td>
         </tr>
         <tr>
             <td>Hoặc lọc theo chi đoàn</td>
             <td>
                 <asp:DropDownList ID="drlLocTheoChiDoan" runat="server" Height="16px" Width="202px" DataSourceID="SqlDataSource1" DataTextField="MaChiDoan" DataValueField="MaChiDoan" AutoPostBack="True" OnSelectedIndexChanged="drlLocTheoChiDoan_SelectedIndexChanged">

                 </asp:DropDownList>
             &nbsp;</td>
         </tr>
     </table>
     <br />


&nbsp;<asp:GridView ID="gvDoanVien" runat="server" AutoGenerateColumns="False" CellPadding="4" EnableModelValidation="True" ForeColor="#333333" GridLines="None" Width="478px">
         <AlternatingRowStyle BackColor="White" />
         <Columns>
             <asp:BoundField DataField="masinhvien" HeaderText="Mã SV" />
             <asp:TemplateField HeaderText="Họ và tên">
                 <ItemTemplate>
                     <a href='Thongtindoanvien.aspx?id=<%#Eval("MaSinhVien") %>'>  <%#Eval("Ho") %> <%#Eval("Ten") %></a>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField DataField="NgaySinh" HeaderText="Ngày sinh" DataFormatString="{0:d}" />
             <asp:BoundField DataField="Dienthoailienhe" HeaderText="Điện thoại" />
             
         </Columns>
         <EditRowStyle BackColor="#2461BF" />
         <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
         <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
         <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
         <RowStyle BackColor="#EFF3FB" />
         <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
     </asp:GridView>
      <br />
     <br />
     <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Xuất tập tin Excel" Visible="False" />
     </div>  

</asp:Content>
